---@class FighterStateEnum
FighterStateEnum = {}
Battle.FighterStateEnum = FighterStateEnum
function FighterStateEnum.is(states, state)
    return bit.band(states, state) > 0
end

FighterStateEnum.CAN_NOT_NORMAL_ATTACK = 1 --3不能普通攻击
FighterStateEnum.CAN_NOT_MOVE = 2       --1不能移动
FighterStateEnum.BUFF_HIDE = 3                  --buff隐身
FighterStateEnum.CAN_NOT_USE_SKILL = 4      -- 2不能使用技能
FighterStateEnum.SEE_HIDE = 5                   -- 5看到隐身
FighterStateEnum.CAN_NOT_PATH_FIND = 6       -- 无法主动移动(不可寻路)



FighterStateEnum.CAN_NOT_SELECT_BY_ENEMY = 23              --无法选中
FighterStateEnum.GRASS_HIDE = 24                    -- 草丛隐身
FighterStateEnum.IMMUNITY_CTRL = 25                    -- 免疫控制
FighterStateEnum.IMMUNITY_HIT_INTERRUPT = 26                   -- 免疫受击打断

function FighterStateEnum.GetStateName(id)
    local enum = Battle.FighterStateEnum
    if id == enum.CAN_NOT_NORMAL_ATTACK then return "无法攻击" end
    if id == enum.CAN_NOT_MOVE then return "无法移动" end
    if id == enum.BUFF_HIDE then return "buff隐身" end
    if id == enum.CAN_NOT_USE_SKILL then return "不能使用主动技能" end
    if id == enum.SEE_HIDE then return "看到隐身" end
    if id == enum.CAN_NOT_PATH_FIND then return "不可主动移动" end

    if id == enum.CAN_NOT_SELECT_BY_ENEMY then return "不可选中" end
    if id == enum.GRASS_HIDE then return "草丛隐身" end
    if id == enum.IMMUNITY_CTRL then return "免疫控制" end
    if id == enum.IMMUNITY_HIT_INTERRUPT then return "免疫受击中断" end
    return tostring(id)
end
